package models_main

import (
	"fmt"
	"longmen/server/pkg/db/mysql/models"
	"time"
)

type Guild struct {
	Id           int       `json:"id" gorm:"primaryKey;autoIncrement"`
	Name         string    `json:"name"`
	Icon         string    `json:"icon"`
	Content      string    `json:"conent"`
	SharingRatio int       `json:"sharing_ratio"` //int(3) DEFAULT '60' COMMENT '分成比例 %',
	CreateTime   time.Time `json:"create_time"`   //datetime DEFAULT NULL,
	AdminId      int       `json:"admin_id"`
	Status       int       `json:"status"`

	//下面弃用， 等待txnotify代码修复
	Diamond      int `json:"diamond"`       //int(10) DEFAULT '0' COMMENT '钻石数量',
	DiamondTotal int `json:"diamond_total"` //int(10) DEFAULT '0' COMMENT '累计钻石数量',
}

func (Guild) TableName() string {
	return fmt.Sprintf("%sguild", models.Prefix)
}
